Skip to content

remove old exposure activity fields and import exposure disease configuration#13911

Merged
obinna-h-n merged 1 commit into
developmentfrom
13887-exposure-form-redesign
Apr 22, 2026
Merged

remove old exposure activity fields and import exposure disease configuration#13911
obinna-h-n merged 1 commit into
developmentfrom
13887-exposure-form-redesign

Conversation

@obinna-h-n
Copy link
Copy Markdown
Contributor

@obinna-h-n obinna-h-n commented Apr 22, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added seat number field to exposure tracking
  • Improvements

    • Exposure type field is now optional instead of required
    • Streamlined exposure form by removing activity details section
    • Simplified data entry interface with condensed field layout
    • Updated disease exposure category default mappings

@obinna-h-n obinna-h-n merged commit 528f57d into development Apr 22, 2026
4 of 8 checks passed
@obinna-h-n obinna-h-n deleted the 13887-exposure-form-redesign branch April 22, 2026 10:48
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d7a86582-eeb2-4a49-b655-679bd6bcf6ea

📥 Commits

Reviewing files that changed from the base of the PR and between 47847ff and 2eb9b7f.

📒 Files selected for processing (4)
  • sormas-api/src/main/java/de/symeda/sormas/api/exposure/ExposureDto.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/exposure/Exposure.java
  • sormas-backend/src/main/resources/sql/sormas_schema.sql
  • sormas-ui/src/main/java/de/symeda/sormas/ui/exposure/ExposureForm.java

📝 Walkthrough

Walkthrough

This pull request makes exposureType nullable across the application stack—removing validation and database constraints from the DTO, entity, and schema—while simultaneously refactoring the ExposureForm UI to remove the activity details section and associated conditional logic.

Changes

Cohort / File(s) Summary
Exposure Model Constraints
sormas-api/.../ExposureDto.java, sormas-backend/.../Exposure.java
Removed @NotNull bean-validation annotation from ExposureDto and @Column(nullable = false) JPA constraint from Exposure entity, allowing exposureType field to be nullable.
Database Schema Migration
sormas-backend/.../sormas_schema.sql
Migrated schema version 621 to drop NOT NULL constraint on exposures.exposuretype and exposures_history.exposuretype columns; added version 622 to populate default exposure category mappings for disease configurations via repetitive UPDATE statements.
UI Form Refactoring
sormas-ui/.../ExposureForm.java
Removed activity/exposure details layout section, including accordion panel, activity-specific fields (contact-to-case, gathering/habitation/animal-contact/burial/swimming/travel/sexual contact/raw-food details), conditional visibility rules, and setUpRequirements() method; replaced WORK_ENVIRONMENT field with SEAT_NUMBER in location section.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

Possibly related PRs

Suggested reviewers

  • KarnaiahPesula
  • raulbob

Poem

🐰 Hop along, dear data fields so bright,
No more "required" burning quite so tight,
Activity details bundled away with care,
A tidier form now floats through the air!
Nullable types and cleaner UI—
This refactor makes this rabbit hop high! 🥕✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch 13887-exposure-form-redesign

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant